package com.qf.job;

import org.apache.shardingsphere.elasticjob.api.ShardingContext;
import org.apache.shardingsphere.elasticjob.simple.job.SimpleJob;
import org.springframework.stereotype.Component;

import java.util.Date;

/**
 * @author lyx
 * @date 2022/7/11 16:51
 */
//交给spring管理
@Component
public class MyJob implements SimpleJob {
    @Override
    public void execute(ShardingContext shardingContext) {
        System.out.println("-------------任务执行了-------------"+new Date());
    }
}
